11. Hello World: Written Instructions

Hello World: Written Instructions

Making Your First App : Hello World

1. Welcome to Android Studio Screen

First, open Android Studio. You should see this window. Go ahead and click Start a new Android Studio Project. An Android Studio Project typically means the code and files for one Android Application.

Select the "Start a new Android Studio project" option

Select the "Start a new Android Studio project" option

2. Configure your new project

For this app, use this configurations:

  • Application Name: Happy Birthday
  • Company domain: android.example.com
  • Project location: < Your choice of where to save this project on your computer >

These are the configurations we are using for this example project

These are the configurations we are using for this example project

3. Select the form factors your app will run on

We've decided to build this project for Phone and Tablets with Minimum SDK of API 15.

Remember that you can use the Help me choose link to see Android Platform/API Version distribution to see the number of active devices in the world running on each API.

We are building for Phone and Tablet and using API 15 as the Minimum SDK

We are building for Phone and Tablet and using API 15 as the Minimum SDK

4. Add an Activity to Mobile

In the latest version of Android Studio, you will need to select the "Empty Activity" option to have starter code that matches Lyla's from the previous video.

Select the "Empty Activity" option

Select the "Empty Activity" option

Hello World: Written Instructions

5. Customize the Activity and Finish

For the new activity, give it these names:

  • Activity Name: MainActivity (Select Generate Layout File)
  • Layout Name: activity_main (Select Backwards Compatibility (AppCompat))

Once those options have been selected, click Finish to generate your first project!

Name the activity *MainActivity* and the Layout Name *activity_main*

Name the activity MainActivity and the Layout Name activity_main

Hello World: Written Instructions

Depending on your computer speed it might take a minute to set up your project. Go ahead and get some tea or do a stretch.

Running into Errors?

Don't panic! Lots of students have had issues with downloading Android Studio so you are not alone. To help you can try:

  1. Troubleshooting Document is a growing document that lists solutions to common problems that students run in to.

  2. The forums are a great resource and can be accessed by clicking the Discussion Topics link next to the video you're having trouble with.

    We'll be looking at the forums and updating the troubleshooting document based of discussions there. When you post make sure to:

  • Include the error message or a screenshot of the problem you are seeing.
  • To take a screenshot, use the keys Command-Shift-4 on a Mac or the Screenshot key on a Windows machine. Then upload using the image upload button in the forums:

Hello World: Written Instructions

Access the "Forums" from the "Resources" tab in the Classroom

Access the "Forums" from the "Resources" tab in the Classroom

Hello World: Written Instructions

To help with troubleshooting, remember to include the error message or a screenshot when posting about a problem

To help with troubleshooting, remember to include the error message or a screenshot when posting about a problem

Hello World: Written Instructions

  • Note If you post about a problem and later solve it, share your experience on the forum. It could help others!

3. Google is a great tool for troubleshooting. Copy the exact error message you're getting and search for it. Try adding Android to the search terms if just Googling the error message isn't working.